﻿
// MFCTestDlg.h: 头文件
//

#pragma once

#include <vector>
using namespace std;

#include "pictureex.h"

#define WM_ICONMESSAGE WM_USER+10

// CMFCTestDlg 对话框
class CMFCTestDlg : public CDialogEx
{
// 构造
public:
	CMFCTestDlg(CWnd* pParent = nullptr);	// 标准构造函数
	~CMFCTestDlg();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_MFCTEST_DIALOG };
#endif

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持

public:
	void DrawGif();
	void ListFiles(vector<CString> &files);
	void PlayMp3();
	CString GetFullPath();
	void MoveRight();
	void CreateTrayIcon();
	afx_msg LRESULT OnShowTrayMenu(WPARAM wp, LPARAM lp);

private:
	CPictureEx* m_pPic;
	vector<int> m_vecGif;
	int m_nIndex;
	NOTIFYICONDATA m_icon;
	// 允许移动窗口
	BOOL m_bMove;


// 实现
protected:
	HICON m_hIcon;

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg LRESULT OnNcHitTest(CPoint point);
	afx_msg void OnMenuClose();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
};
